package com.ilovetolearn.model
{
	import com.adobe.cairngorm.CairngormError;
	import com.adobe.cairngorm.CairngormMessageCodes;
	import com.adobe.cairngorm.model.IModelLocator;
	import com.ilovetolearn.view.WordProgressBar;
	import com.ilovetolearn.vo.CourseVo;
	import com.ilovetolearn.vo.InitializeWordVo;
	import com.ilovetolearn.vo.SentenceVo;
	import com.ilovetolearn.vo.UserVo;
	import com.ilovetolearn.vo.WordVo;

	import mx.collections.ArrayCollection;

	[Bindable]
	public class ModelLocator implements IModelLocator
	{

		private static var _instance:ModelLocator;

		public function ModelLocator(enforcer:ModelSingletonEnforcer)
		{
			if (enforcer == null)
				throw new CairngormError(CairngormMessageCodes.SINGLETON_EXCEPTION, "ModelLocator");
		}

		public static function getInstance():ModelLocator
		{
			if (!_instance)
				_instance=new ModelLocator(new ModelSingletonEnforcer());

			return _instance;
		}
		public var site:String="http://www.ilovetolearn.com.cn/";
		public var InitServiceURL:String=site + "learn.php";
		public var WordServiceURL:String=site + "learn.php";
		public var SaveServiceURL:String=site + "learn.php";
		public var wordInitParams:InitializeWordVo; //请求单词参数vo
		public var user:UserVo; //用户信息
		public var course:CourseVo; //课程信息
		public var wordAc:ArrayCollection; //单词列表
		public var sentenceAc:ArrayCollection; //语句列表
		public var curState:String=""; //当前视图状态
		public var curStudyWord:WordVo;
		public var curStudyIndex:Number=0;
		public var clicksound:String="upload/click.mp3";
		public var errorsound:String="upload/error.mp3";
		public var wordprg:WordProgressBar; //单词进度条
	}
}

class ModelSingletonEnforcer
{

}